/**
* ClassName: FIeldTest
* Package: com.atguigu03.field_method.field
* Description:
 * 案例：
 *
 * 声明员工类Employee，包含属性：编号id、姓名name、年龄age、薪资salary。
 *
 * 声明EmployeeTest测试类，并在main方法中，创建2个员工对象，并为属性赋值，并打印两个员工的信息。
* @Author xiao_qi
* @Create 2024/3/16 21:50 
* @Version 1.0   
*/
public class FIeldTest {
    public static void main(String[] args) {

        employee p1 = new employee();
        employee p2 = new employee();
        p1.salary=10000.0;
        p1.id=1;
        p1.name="张三";
        p1.age=23;

        p1.employees();
        p2.salary=10100.0;
        p2.id=2;
        p2.name="李四";
        p2.age=22;
p2.employees();
    }
}
class employee{
    int id;
    String name;
    int age;
    double salary;
    public void employees(){
        System.out.println("员工:" + id + "," + "姓名：" + name + ",年龄：" + age + "，薪资：" + salary);
    }
}